package com.example.day09question.presenter;

import com.example.day09question.bean.RvBean;
import com.example.day09question.modle.MainPageModel;
import com.example.day09question.net.ResultCallBack;
import com.example.day09question.view.NetView;

/**
 * Created by 阿炜啊 on 2020/7/15.
 */

public class Netreok implements ResultCallBack {

    private NetView netView;
    private MainPageModel mainPageModel;

    public Netreok(NetView netView) {
        this.netView = netView;
        mainPageModel = new MainPageModel();
    }

    @Override
    public void onSuccess(RvBean list) {
        netView.setData(list);
    }

    @Override
    public void onFail(String msg) {
        netView.shoutow(msg);
    }
    public void setdata(){
        mainPageModel.getData(this);
    }

}
